package com.oilsection.demo.controller;

import com.oilsection.demo.controller.req.JzUpdateLocationReq;
import com.oilsection.demo.service.impl.JzService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@RestController
@RequestMapping("/jz")
@RequiredArgsConstructor
public class JzController {
    private final JzService jzService;

    @PostMapping("/updateLocation")
    @CrossOrigin
    public String updateLocation(@RequestBody @Valid JzUpdateLocationReq req) {
        jzService.updateLocation(req);
        return "success";
    }
}
